<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Kodi Login</title>
<link rel="shortcut icon" href="/csh/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="/csh/stylesheet.css"/>
</head>

<body>
<header>
  <p><a href="/csh"><img src="/csh/homeicon" alt="csh"/></a></p>
</header>

<h1>Adding Kodi Login Option</h1>
<p>
  Trisquel GNU/Linux has XBMC, but not Kodi.  Installing its XBMC
  package puts an option on the login screen to use no desktop
  environment and just XBMC.  This provides a more complete experience
  without the distraction of unnecessary desktop software.
  Unfortunately, XBMC is a very old version of Kodi,
  and <a href="https://f-droid.org/packages/org.xbmc.kore/">Kore</a>,
  the remote control app for Kodi
  on <a href="https://replicant.us/">Replicant</a>, will not work with
  XBMC.</p>
<p>
  Fortunately, there is a way to get the latest version of Kodi
  without accidentally installing proprietary software, and it should
  work on any GNU/Linux <abbr title="operating system">OS</abbr>.</p>
<h2>Install Kodi</h2>
<ol>
    <li>Install Guix.  See <a href="https://www.gnu.org/software/guix/manual/html_node/Binary-Installation.html"><cite>GNU Guix Reference Manual: Binary Installation</cite></a>.</li>
    <li><kbd>guix package --install kodi</kbd></li>
</ol>
<h2>Add Login Entry</h2>
<ol>
    <li>Find XBMC login setting: <kbd>find / -name 'XBMC.desktop'</kbd></li>
    <li>Go to it.  In my case: <kbd>cd /usr/share/xsessions/</kbd></li>
    <li>Make a copy for Kodi: <kbd>cp XBMC.desktop Kodi.desktop</kbd></li>
    <li>Edit <samp>Kodi.desktop</samp>, replacing <samp>xbmc-standalone</samp> with Guix's <samp>kodi-standalone</samp>: <kbd>sed -i 's|xbmc-standalone|/gnu/store/kmj9rm1ygsf702x3cxhy78fi960psdfz-profile/bin/kodi-standalone|g' Kodi.desktop</kbd></li>
    <li>Edit <samp>Kodi.desktop</samp> renaming XBMC to Kodi: <kbd>sed -i 's|XBMC|Kodi|g' Kodi.desktop</kbd></li>
</ol>
<p>
  Kodi should now be an option in your display manager.  To log into Kodi, log out and select the Trisquel logo next to your name.  Choose <q>Kodi</q> from the menu.</p>
<p>
  Thanks to <a href="http://lists.gnu.org/archive/html/help-guix/2017-11/msg00080.html">Marius Bakke</a></p>

<hr/>
<footer>
<p>Last updated: 2017-11-19 18:41:03 CST.</p>
<p>
Copyright 2017 Caleb Herbert under the terms of the
<a href="https://creativecommons.org/licenses/by/4.0/">Attribution
4.0 International</a> license.</p>
</footer>
</body>
</html>
